﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />

<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>
  
</head>

<body class="ms-theme-blue">

  <%@ include file="/WEB-INF/include/header.jsp"%>
  <%@ include file="/WEB-INF/include/submenu.jsp"%>

  <div class="container-fluid umu-container has-umu-sidemenu">
    <div class="umu-breadcrumb">
      <div class="breadcrumb">事业部管理</div>
    </div>
    

    <div class="panel-default beast-panel beast-panel-layout">

      <div class="panel-body">

        <div class="col-xs-12 beast-panel-layout-right">

    		  <div class="ms-content-layout">
		      <!-- <div class="ms-operation-bar no-margin no-bottom-border clearfix">
		        <div class="ms-operation-group pull-right">
					<a href="${ctx.host}/bu-leaders/search" data-toggle="modal" data-target="#search" class="btn btn-shadow-success btn-shadow umu-btn">
					  <i class="glyphicon glyphicon-search"></i>&nbsp;&nbsp;过滤查询
					</a>
					<a href="${ctx.host}/bu-leaders/create" class="btn btn-shadow-success btn-shadow umu-btn" data-target="#create" data-toggle="modal"> 
					  <i class="glyphicon glyphicon-plus"></i>&nbsp;&nbsp;新增事业部负责人
					</a>
		        </div>
		      </div>
		       -->
		      <div class="ms-operation-bar no-margin no-bottom-border clearfix">
		        <div class="ms-operation-group pull-right">
		          <a href="${ctx.host}/departments/sync" data-target="#sync" data-toggle="modal" class="btn btn-shadow-success btn-shadow umu-btn">
		            <i class="glyphicon glyphicon-send"></i>&nbsp;&nbsp;同步
		          </a>
		        </div>
		      </div><br />	
		    
		      <table class="table table-hover umu-table tab-pane table-striped">
		        <thead>
		          <tr> 
		            <th>事业部名称</th>
		            <th>事业部编号</th>
		            <th>部门负责人</th>
		          </tr>
		        </thead>
		        
		        <tbody>
		        	<c:forEach items="${departments}" var="departments">
		        		<tr>
		        			<td>${departments.name}</td>
		        			<td>${departments.code}</td>
		        			<td>${departments.lead}</td>
		        		</tr>
		        		
		        	</c:forEach>
		        	
				<!--	<tr>
		            <td>开发部</td>
		            <td>1</td>
					</tr>		        
					<tr>
		            <td>人事部</td>
		            <td>2</td>
					</tr>		        -->
		        </tbody>
							<tfoot>
								<tr>
									<td colspan="4" class="no-vertical-padding"> 
										<div class="pull-left">
											<jsp:include page="/WEB-INF/include/page.jsp">
												<jsp:param name="url" value="${ctx.host}/departments"/>
												<jsp:param name="queryString" value="${queryString}"/> 
											</jsp:include>
										</div>
									</td>
								</tr>
								
							</tfoot>	        
		
		      </table>
		    </div>           
        </div>

      </div>

    </div>

  </div>

  <%@ include file="/WEB-INF/include/footer.jsp"%>
  <%@ include file="/WEB-INF/include/script.jsp"%>
<d:resource root="${ctx.resource}/build" type="script" src="js/page/department/department-list.js" />
		<script type="text/javascript">
			require(['page/department/department-list'], function(page) {
				page.init();
			})
		</script>
</body>
</html>